<template>
    <div>
        <top-style
            ><span>{{ second.name }}</span></top-style
        >
        <div class="plate-style-two">
            <ul>
                <li v-for="item in second.list" :key="item.id">
                    <router-link :to="{ name: 'detail', query: { id: item.id, title: item.title } }">
                        <div class="img-box">
                            <img :src="item.cover" alt="" />
                        </div>
                    </router-link>
                </li>
            </ul>
        </div>
    </div>
</template>

<script>
import TopStyle from "@/components/top-style.vue";
export default {
    props: ["second"],
    components: {
        TopStyle,
    },
    created() {
        // console.log(this.second);
    },
};
</script>

<style lang="scss" scoped>
.plate-style-two {
    width: 100%;
    ul {
        width: 100%;
        height: 100%;
        display: grid;
        // grid-template-columns: 1fr 1fr 1fr 1fr;
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: repeat(2, 2fr);
        gap: 10px 10px;
    }
    li {
        width: 100%;
        height: 100%;
        .img-box {
            width: 100%;
            height: 100%;
            img {
                width: 100%;
                height: 100%;
            }
        }

        &:first-child {
            grid-column: 1/3;
            grid-row: 1/3;
        }
    }
    .first {
    }
}
</style>
